package com.example.springboot.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.util.Date;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * <p>
 * 体检表
 * </p>
 *
 * @author jiang
 * @since 2025-04-17
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("health")
@Schema(name = "HealthEntity", description = "体检表")
public class HealthEntity extends Model<HealthEntity> {

    @Schema(description = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "用户ID")
    @TableField("user_id")
    private Integer userId;

    @Schema(description = "体检日期")
    @TableField("check_date")
    private Date checkDate;

    @Schema(description = "身高（cm）")
    @TableField("height")
    private Float height;

    @Schema(description = "体重（kg）")
    @TableField("weight")
    private Float weight;

    @Schema(description = "收缩压（mmHg）")
    @TableField("blood_pressure_systolic")
    private Float bloodPressureSystolic;

    @Schema(description = "舒张压（mmHg）")
    @TableField("blood_pressure_diastolic")
    private Float bloodPressureDiastolic;

    @Schema(description = "心率（次/分钟）")
    @TableField("heart_rate")
    private Integer heartRate;

    @Schema(description = "血型")
    @TableField("blood_type")
    private String bloodType;

    @Schema(description = "血糖（mmol/L）")
    @TableField("blood_glucose")
    private Float bloodGlucose;

    @Schema(description = "胆固醇（mmol/L）")
    @TableField("cholesterol")
    private Float cholesterol;

    @Schema(description = "甘油三酯（mmol/L）")
    @TableField("triglycerides")
    private Float triglycerides;

    @Schema(description = "肝功能")
    @TableField("liver_function")
    private String liverFunction;

    @Schema(description = "肾功能")
    @TableField("kidney_function")
    private String kidneyFunction;

    @Schema(description = "其他")
    @TableField("other_findings")
    private String otherFindings;

    @Schema(description = "医生建议")
    @TableField("doctor_advice")
    private String doctorAdvice;

    @Schema(description = "创建时间")
    @TableField("current")
    private Date current;

    public static final String ID = "id";

    public static final String USER_ID = "user_id";

    public static final String CHECK_DATE = "check_date";

    public static final String HEIGHT = "height";

    public static final String WEIGHT = "weight";

    public static final String BLOOD_PRESSURE_SYSTOLIC = "blood_pressure_systolic";

    public static final String BLOOD_PRESSURE_DIASTOLIC = "blood_pressure_diastolic";

    public static final String HEART_RATE = "heart_rate";

    public static final String BLOOD_TYPE = "blood_type";

    public static final String BLOOD_GLUCOSE = "blood_glucose";

    public static final String CHOLESTEROL = "cholesterol";

    public static final String TRIGLYCERIDES = "triglycerides";

    public static final String LIVER_FUNCTION = "liver_function";

    public static final String KIDNEY_FUNCTION = "kidney_function";

    public static final String OTHER_FINDINGS = "other_findings";

    public static final String DOCTOR_ADVICE = "doctor_advice";

    public static final String CURRENT = "current";

    @Override
    public Serializable pkVal() {
        return this.id;
    }
}
